//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
#include <vcl\Buttons.hpp>
#include <vcl\ComCtrls.hpp>
//---------------------------------------------------------------------------
class Kolo {

int x, y, r;
TCanvas *canvas;
TColor kolor;
public :
Kolo (TCanvas *canvas, int x, int y, int r, TColor kolor) : canvas(canvas),x(x),y(y), r(r),kolor(kolor)
{
 rysuj();
}

void rysuj(){
TPenMode old=canvas->Pen->Mode;
canvas->Pen->Color=kolor;
canvas->Pen->Mode=pmNotXor;
canvas->Ellipse(x-r,y-r,x+r,y+r);
canvas->Pen->Mode=old;
}

void przesun(int nowyX, int nowyY)
{
 rysuj();
 x=nowyX;
 y=nowyY;
 rysuj();

}

~Kolo(){rysuj();}

};




class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TPanel *Panel1;
        TImage *Image;
	TSpeedButton *ButtonStart;
	TSpeedButton *ButtonStop;
	TTrackBar *TrackBar;
        TEdit *Edit3;
        TEdit *Edit4;
        TLabel *Label3;
        TLabel *Label4;
        TComboBox *ComboBox1;
        TLabel *Label5;
        TLabel *Label6;
	TEdit *EditY;
	TEdit *EditX;
	TTimer *Timer;
        void __fastcall FormCreate(TObject *Sender);
	void __fastcall ButtonStartClick(TObject *Sender);
	
	void __fastcall TimerTimer(TObject *Sender);
	void __fastcall ButtonStopClick(TObject *Sender);
private:	// User declarations
          int x,y;
          Kolo *kolo;
          double alfe, v;
          double t;

public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
